home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Python-1.4 / Docs / Amiga / amigapath_module < prev    next >
Text File  |  1998-06-24  |  2KB  |  95 lines

  1.  
  2.  
  3.                              AMIGAPATH MODULE
  4.  
  5.                       Irmen de Jong - ijong@gak.nl
  6.                                27 dec. 1996
  7.  
  8.  
  9. This  document describes the module `amigapath'.  This is the Amiga version
  10. of  the  `posixpath' module which is used on Unix.  You should not directly
  11. import this module!  Always use module `os' instead and then use os.path.
  12.  
  13. Functions in this module:
  14.  
  15.     basename
  16.     commonprefix
  17.     dirname
  18.     exists
  19.     expanduser
  20.     expandvars
  21. (*) fullpath
  22. (*) isabs
  23.     isdir
  24.     isfile
  25.     islink
  26. (*) ismount
  27.     join
  28. (*) normcase
  29. (*) normpath
  30.     samefile
  31.     sameopenfile
  32.     samestat
  33. (*) split
  34. (*) splitdrive
  35.     splitext
  36. (*) walk
  37.  
  38. For  documentation, see docs on posixpath module.  Functions marked (*) are
  39. different from the ones in the posixpath module and are described below.
  40.  
  41.  
  42.   fullpath
  43.   ~~~~~~~~
  44. New function.  Returns the full pathname of a file/directory (i.e.  expands
  45. assigns).   Implemented  in  amiga  module  but  don't use it directly from
  46. there, always use os.path.fullpath.
  47.  
  48.  
  49.   isabs
  50.   ~~~~~
  51. On the Amiga, a path is absolute when a ':' occurs in it.
  52.  
  53.  
  54.   ismount
  55.   ~~~~~~~
  56. On the Amiga, a mount point is considered to be a device name.
  57.  
  58.  
  59.   normcase
  60.   ~~~~~~~~
  61. On the Amiga, actually does convert the path to lowercase.
  62.  
  63.  
  64.   normpath
  65.   ~~~~~~~~
  66. On  the Amiga, does nothing because x/y//z is different than x/y/z, because
  67. a double slash (//) in a path means 'parent directory'.
  68.  
  69.  
  70.   split
  71.   ~~~~~
  72. Split  a  path in head (everything up to the last '/' or ':') and tail (the
  73. rest).  If the path ends in '/' or ':', tail will be empty.  If there is no
  74. '/'  or  ':'  in  the path, head will be empty.  DIFFERENCE WITH posixpath:
  75. only  ONE  trailing '/' will be stripped from head!  (on the Amiga a double
  76. slash  means  "parent  dir"!   ) This means that if head ends in a '/', you
  77. MUST  add  a  '/'  to it when reconstructing the path, or you will lose the
  78. "parent  dir"  slash.   Functions  that  depend  on  this function are also
  79. affected!  (basename, dirname)
  80.  
  81. (Suggested by Kent Polk, kent@eaenki.nde.swri.edu)
  82.  
  83.  
  84.   splitdrive
  85.   ~~~~~~~~~~
  86. Splits  a pathname into a drive specification and the rest of the path.  On
  87. the Amiga this is useful (not on Unix).
  88.  
  89.  
  90.   walk
  91.   ~~~~
  92. As  the  Amiga  doesn't  know  the  concept of '.' and '..' directories, no
  93. exceptions are made for them.
  94.  
  95.